Skip to content

Implement editorconfig serializer for naming style preferences (17.12)#76376

Merged
arunchndr merged 3 commits intodotnet:release/dev17.12from
tmat:NamingStylePrefs17.12
Dec 12, 2024
Merged

Implement editorconfig serializer for naming style preferences (17.12)#76376
arunchndr merged 3 commits intodotnet:release/dev17.12from
tmat:NamingStylePrefs17.12

Conversation

@tmat
Copy link
Member

@tmat tmat commented Dec 11, 2024

The serializer is required when saving naming style preferences specified in Tools > Options to solution fallback options. The option was throwing NotSupportedException, which was reported via NFW but for some reason does not appear in telemetry data (TBD why).

In order to preserve ordering of the naming style rules as specified in Tools > Options settings we introduce a new editor option dotnet_naming_rule.{rule-name}.priority. The highest priority is 0, which is the default. When saving VS options we generate priorities 0..N-1 where N is the number of rules. This causes VS option order to be preserved when the preferences are deserialized from fallback options.

Note that if any naming style is set in .editorconfig file, all naming style settings in VS options are ignored. This behavior is consistent with VS 2019.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2297536

@tmat tmat requested a review from a team as a code owner December 11, 2024 18:24
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 11, 2024
@arunchndr arunchndr enabled auto-merge December 11, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants